Skip to content

Bump prosemirror-tables so that findTable is always available on @tiptap/pm#7906

Merged
arnaugomez merged 4 commits into
mainfrom
arnaugomez/tt-497-tracked-changes-esm-build-fails-importing-findtable
Jun 2, 2026
Merged

Bump prosemirror-tables so that findTable is always available on @tiptap/pm#7906
arnaugomez merged 4 commits into
mainfrom
arnaugomez/tt-497-tracked-changes-esm-build-fails-importing-findtable

Conversation

@arnaugomez
Copy link
Copy Markdown
Contributor

@arnaugomez arnaugomez commented Jun 1, 2026

Changes Overview

Bump prosemirror-tables in @tiptap/pm and the demos workspace so findTable is available, and align the related ProseMirror dependencies required by the newer tables package.

Implementation Approach

Updated the dependency pins owned by @tiptap/pm, mirrored them in the demos workspace, refreshed the lockfile, and added a patch changeset for @tiptap/pm.

Testing Done

I also had to update a few test expectations because the newer dependency versions serialize HTML a little differently. The editor still behaves the same, but the exact strings in the tests changed.

For example, text-align: left is now serialized as text-align: left;, so the TextAlign demo tests now expect <p style="text-align: left;">... instead of <p style="text-align: left">....

The same thing happened for table markup and text-style commands: styles such as min-width, color, background-color, font-family, font-size, and line-height now include the trailing semicolon in the generated HTML, so those assertions were updated to match the new output.

One whitespace case also changed: when preserving whitespace during insertContent, the content is now rendered with <br> instead of a doubled space in the HTML output, so that expectation was updated too.

The CustomDocument demo test also needed a small interaction fix. The test was clicking the editor wrapper before pressing End and Enter; under parallel Playwright runs that did not always put the caret inside the heading, so the generated paragraph existed but typing did not land in it. The test now clicks the heading itself, then presses End and Enter, and types through the current keyboard focus. That keeps the test aligned with the user interaction it is checking: pressing Enter after the heading should move into the paragraph.

Verification Steps

Build or import @tiptap/pm and confirm findTable resolves from prosemirror-tables.

Additional Notes

The lockfile update is included in the branch as requested.

AI Usage

  • I have used AI tools (e.g., ChatGPT, Claude, Copilot) in creating this PR.
    • I used AI to draft the PR body and summarize the dependency bump.
    • I used AI to investigate and fix the build failure caused by mismatched ProseMirror dependency versions.

Checklist

  • I have created a changeset for this PR if necessary.
  • My changes do not break the library.
  • I have added tests where applicable.
  • I have followed the project guidelines.
  • I have fixed any lint issues.

Related Issues

Closes TT-497

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Jun 1, 2026

🦋 Changeset detected

Latest commit: 4025cfa

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 72 packages
Name Type
@tiptap/pm Patch
@tiptap/core Patch
@tiptap/extension-bubble-menu Patch
@tiptap/extension-code-block-lowlight Patch
@tiptap/extension-code-block Patch
@tiptap/extension-collaboration-caret Patch
@tiptap/extension-collaboration Patch
@tiptap/extension-details Patch
@tiptap/extension-drag-handle-react Patch
@tiptap/extension-drag-handle-vue-2 Patch
@tiptap/extension-drag-handle-vue-3 Patch
@tiptap/extension-drag-handle Patch
@tiptap/extension-emoji Patch
@tiptap/extension-file-handler Patch
@tiptap/extension-floating-menu Patch
@tiptap/extension-horizontal-rule Patch
@tiptap/extension-invisible-characters Patch
@tiptap/extension-link Patch
@tiptap/extension-list Patch
@tiptap/extension-mathematics Patch
@tiptap/extension-mention Patch
@tiptap/extension-node-range Patch
@tiptap/extension-subscript Patch
@tiptap/extension-superscript Patch
@tiptap/extension-table-of-contents Patch
@tiptap/extension-table Patch
@tiptap/extension-unique-id Patch
@tiptap/extensions Patch
@tiptap/html Patch
@tiptap/markdown Patch
@tiptap/react Patch
@tiptap/static-renderer Patch
@tiptap/suggestion Patch
@tiptap/vue-2 Patch
@tiptap/vue-3 Patch
@tiptap/extension-audio Patch
@tiptap/extension-blockquote Patch
@tiptap/extension-bold Patch
@tiptap/extension-code Patch
@tiptap/extension-document Patch
@tiptap/extension-hard-break Patch
@tiptap/extension-heading Patch
@tiptap/extension-highlight Patch
@tiptap/extension-image Patch
@tiptap/extension-italic Patch
@tiptap/extension-paragraph Patch
@tiptap/extension-strike Patch
@tiptap/extension-text-align Patch
@tiptap/extension-text-style Patch
@tiptap/extension-text Patch
@tiptap/extension-twitch Patch
@tiptap/extension-typography Patch
@tiptap/extension-underline Patch
@tiptap/extension-youtube Patch
@tiptap/extension-bullet-list Patch
@tiptap/extension-ordered-list Patch
@tiptap/extension-list-item Patch
@tiptap/extension-list-keymap Patch
@tiptap/extension-task-item Patch
@tiptap/extension-task-list Patch
@tiptap/extension-table-cell Patch
@tiptap/extension-table-header Patch
@tiptap/extension-table-row Patch
@tiptap/extension-character-count Patch
@tiptap/extension-dropcursor Patch
@tiptap/extension-focus Patch
@tiptap/extension-gapcursor Patch
@tiptap/extension-history Patch
@tiptap/extension-placeholder Patch
@tiptap/extension-color Patch
@tiptap/extension-font-family Patch
@tiptap/starter-kit Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@netlify
Copy link
Copy Markdown

netlify Bot commented Jun 1, 2026

Deploy Preview for tiptap-embed ready!

Name Link
🔨 Latest commit 4025cfa
🔍 Latest deploy log https://app.netlify.com/projects/tiptap-embed/deploys/6a1ea5c66300bb00085ba1ae
😎 Deploy Preview https://deploy-preview-7906--tiptap-embed.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@arnaugomez arnaugomez changed the title fix(pm): bump prosemirror-tables for findTable Bump prosemirror-tables so that findTable is always available on @tiptap/pm Jun 1, 2026
@arnaugomez arnaugomez force-pushed the arnaugomez/tt-497-tracked-changes-esm-build-fails-importing-findtable branch from ee2a194 to c1a2ce8 Compare June 1, 2026 15:14
@arnaugomez arnaugomez requested a review from bdbch June 1, 2026 15:16
@arnaugomez
Copy link
Copy Markdown
Contributor Author

Unfortunately the version bump breaks the tests because of how HTML is generated in the new versions of ProseMirror:

    Expected: "<p style=\"text-align: right\">Example Text</p>"
    Received: "<p style=\"text-align: right;\">Example Text</p>"

@bdbch
Copy link
Copy Markdown
Member

bdbch commented Jun 2, 2026

For example, text-align: left is now serialized as text-align: left;, so the TextAlign demo tests now expect

... instead of

....

Is there a way to inspect HTML or the computed style object via playwright? Maybe that's safer than using the actual style tag to check for it? That way we don't need to worry about it breaking in the future again. :)

bdbch
bdbch previously approved these changes Jun 2, 2026
@arnaugomez
Copy link
Copy Markdown
Contributor Author

arnaugomez commented Jun 2, 2026

For example, text-align: left is now serialized as text-align: left;, so the TextAlign demo tests now expect <p style="text-align: left;">... instead of <p style="text-align: left">....

Yes. you can assert computed CSS:

const paragraph = page.locator('p').filter({ hasText: '...' })

await expect(paragraph).toHaveCSS('text-align', 'left')

@arnaugomez arnaugomez merged commit b48e23f into main Jun 2, 2026
13 checks passed
@bdbch
Copy link
Copy Markdown
Member

bdbch commented Jun 2, 2026

Nice, thanks!

@bdbch bdbch deleted the arnaugomez/tt-497-tracked-changes-esm-build-fails-importing-findtable branch June 2, 2026 13:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants